/*
	Copyright (c) 2007, ANYwebcam.com Pty Ltd. All rights reserved.

	The software in this package is published under the terms of the BSD style 
	license, a copy of which has been included with this distribution in the 
	license.txt file.
*/
package com.anywebcam.di
{
	import com.anywebcam.reflection.*;

	/**
	 * The Dependency Injection Component adapter interface
	 */
	public interface DIComponent
	{
		/**
		 * Returns the key (String identifier, or Class) this component is registered with
		 */
		function get key():Object;

		/**
		 * Returns the Class this DIComponent provides or manages
		 */
		function get type():Class;		

		/**
		 * Returns the ClassInfo for the type this DIComponent provides or manages. 
		 * 
		 * @see com.anywebcam.reflection.ClassInfo
		 */
		function get classInfo():ClassInfo;

		/**
		 * Request an instance of the type this DIComponent is providing / managing.
		 * 
		 * @param container The DIContainer from which to request dependencies for this instance
		 * @return An instance of the type this DIComponent provides. 
		 */
		function getInstance( container:DIContainer ):Object;
	}
}